package string;

import com.sun.deploy.util.StringUtils;
import org.junit.jupiter.api.Test;

import java.util.*;

/**
 * String 的测试例子
 * @author: kejl
 * @create: 2020-07-05 14:26
 */
public class StringTest {

    /**
     * 进行字符串的拼接 1.8 之后的支持
     */
    @Test
    public void stringJoin(){
        String[] strArray = new String[]{"1","2","3"};
        List<String> stringList = Arrays.asList(strArray);
        String  string = StringUtils.join(stringList,",");
        String str = String.join(",",strArray);
        String str1 = String.join(",",stringList);
        System.out.println(string);
        System.out.println(str);
        System.out.println(str1);

    }
}
